/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package TO;

import java.util.Observable;

/**
 *
 * @author admin-pc
 */
public class AuthorTO extends Observable {

    private int authorId;
    private String authorName;

    public AuthorTO() {
    }

    public AuthorTO(int authorId, String authorName) {
        this.authorId = authorId;
        this.authorName = authorName;
    }

    public AuthorTO(String authorName) {
        this.authorName = authorName;
    }

    public AuthorTO(String name, int id) {
        this.authorId = id;
        this.authorName = name;
    }

    public void authorChanged() {
        setChanged();
        notifyObservers();
    }

    public void setAuthorId(int authorId) {
        this.authorId = authorId;
        authorChanged();
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
        authorChanged();
    }

    public int getAuthorId() {
        return authorId;
    }

    public String getAuthorName() {
        return authorName;
    }

}
